package DistSys;

/**
 * The class <code>WebConst</code> holds information about the path to
 * additional file on the web server.
 */
public class WebConst {
    /**
     * Sets the "root" path to the webserver
     */
    /* Lavelle's server by default*/
    private static String sWebPath  = "http://10.66.248.217/iPad/";

    /**
     * Set the "root" path to the webserver.
     *
     * @param str  a <code>String</code> specifying the "root"web path.
     * @see #getDistrelURL
     * @see #getNetrelURL
     * @see #getQuickflowURL
     * @see #getNetflowURL
     */
    public static void setWebPath(String str) { sWebPath = str; }


    /**
     * Returns the URL path to the engines.
     *
     * @return  the URL path to the engine files
     */
    public static final String getEngineWebPath() {
        return sWebPath + "PadEngines/";
    }

    /**
     * Returns the URL to the radial power flow engine.
     *
     * @return  the URL path to the QuickFlow.asp file
     *
     * @see #getDistrelURL
     * @see #getNetrelURL
     * @see #getNetflowURL
     */
    public static final String getQuickflowURL() {
        return getEngineWebPath() + "QuickFlow.asp";
    }

    /**
     * Returns the URL to the network power flow engine.
     *
     * @return  the URL path to the NetFlow.asp file
     *
     * @see #getDistrelURL
     * @see #getNetrelURL
     * @see #getQuickflowURL
     */
    public static final String getNetflowURL() {
        return getEngineWebPath() + "NetFlow.asp";
    }

    /**
     * Returns the URL to the radial reliability engine.
     *
     * @return  the URL path to the Distrel.asp file
     *
     * @see #getNetrelURL
     * @see #getQuickflowURL
     * @see #getNetflowURL
     */
    public static final String getDistrelURL() {
        return getEngineWebPath() + "Distrel.asp";
    }

    /**
     * Returns the URL to the network reliability engine.
     *
     * @return  the URL path to the Netrel.asp file
     *
     * @@see #getDistrelURL
     * @see #getQuickflowURL
     * @see #getNetflowURL
     */
    public static final String getNetrelURL() {
        return getEngineWebPath() + "Netrel.asp";
    }

    /**
     * Returns the URL to the manual.
     *
     * @return  the URL path to the manual
     *
     * @see #getFeedbackURL
     */
    public static final String getManualURL() {
        return sWebPath + "Manual.htm";
    }

    /**
     * Returns the URL to the feedback page.
     *
     * @return  the URL path to the feedback page
     *
     * @see #getManualURL
     */
    public static final String getFeedbackURL() {
        return sWebPath + "Feedback.htm";
    }
}